package svc

import (
	"center-data-platform/app/search/rpc/internal/config"
	"center-data-platform/utils/elasticsearch"
	"center-data-platform/utils/elasticsearch/model"
)

type ServiceContext struct {
	Config        config.Config
	ElasticSearch *elasticsearch.ESClient
	EsBuilder     *model.SearchBuilder
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:        c,
		ElasticSearch: elasticsearch.NewClient(),
		EsBuilder:     model.InitBuilder(),
	}
}
